package GamePoker.PokerJava;

import java.util.ArrayList;
import java.util.Random;

public class PokerManager {
     //ArrayList<Poker>pokers=new ArrayList<>();//
     ArrayList<Poker>pokers=new ArrayList<>();
    String []numbers= {"3","4","5","6","7","8","9","10","J","Q","K","A","2"};
    String []suits= {"♦","♣","❤","♠"};
    PokerManager() {
        for (int i = 0; i < numbers.length; i++) {
            for (int j = 0; j < suits.length; j++) {
                pokers.add(new Poker(new PokerNumber(numbers[i], i), new PokerSuit(suits[j], j)));
            }
        }
    }

        public Poker getPoker()
        {
            Random rd=new Random();
            int index=rd.nextInt(pokers.size());
            pokers.remove(index);
            return pokers.get(index);
        }



    }


